{% extends "exams/base_exams.html" %}

{% block content %}

<h2>Teachers site</h2>
<div class="welcome">Welcome {{ user.username }}</div>

<div>
	<li>Create <a href="/exams/new/">new exam</a></li>
</div>

<h3>Published exams</h2>

{% if exam_list %}
    <ul>
    {% for exam in exam_list %}
        <li>
				<a href="/exams/{{ exam.id }}/summary/">{{ exam.name }}</a> 
				<a class="remove" href="/exams/{{ exam.id }}/delete/" onclick="return confirm('Are you sure you want to delete?')")>remove</a>
			</li>
    {% endfor %}
    </ul>
{% else %}
    <p>No published exams are available.</p>
{% endif %}

<h3>Finished exams</h2>

{% if finished_list %}
    <ul>
    {% for exam in finished_list %}
        <li><a href="/exams/{{ exam.id }}/summary/">{{ exam.name }}</a></li>
    {% endfor %}
    </ul>
{% else %}
    <p>No finished exams are available.</p>
{% endif %}

{% endblock %}

